from django.urls import path,re_path
from . import views
from rest_framework_jwt.views import obtain_jwt_token
urlpatterns = [
    path("collection/", views.MyCollectionListAPIView.as_view()),
    path("collect/", views.CollectionAPIView.as_view()),  #  添加文集
    re_path("collect/(?P<pk>\d+)/", views.CollectionUpdateAPIView.as_view()),  # 修改文集
    path("", views.ArticleOfCollectionViewSet.as_view({"get":"list"})),  # 显示文章的路由
    re_path("^public/(?P<pk>\d+)/$", views.ArticlePublicStatusAPIView.as_view()),  # 切换文章发布状态
    re_path("^move/(?P<pk>\d+)/$", views.ArticlechangeCollection.as_view()),   # 移动文章到其他文集
    re_path("^interval/(?P<pk>\d+)/$", views.ArticleIntervalAPIview.as_view()),
    re_path("^save/(?P<pk>\d+)/$", views.ArticleUpdateAPIview.as_view()),
    path("image/", views.ArticleImageAPIView.as_view()),
    path("special/list/", views.SpecialListAPIView.as_view()),
    path("post/", views.ArticlePostAPIView.as_view()),
    re_path("^(?P<pk>\d+)/$",views.ArticleInfoAPIView.as_view())
]